<!DOCTYPE html>
<html lang="en">
<head>
<title>浩然企业级管理平台</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<#include "/common/csslib.html">
</head>
<body>
    <div class="main-wrapper">
        <!-- start: MAIN CONTAINER -->
        <div class="main-container inner">
            <!-- start: PAGE -->
            <div class="main-content">   
                <div class="container">
                	 <div class="row h-home-path">
                        <div class="col-md-12">
                            <ol class="breadcrumb">
                                <li><i class="fa fa-home"></i>&nbsp;&nbsp;所在位置</li>
                                <li>首页</li>
                                <li class="active">编辑项目测试场景信息</li>
                            </ol>
                        </div>
                    </div>
                    <div class="row h-main-search">
                        <form action="javascript:;" method="post">
                            <div class="pull-right h-btn-group">
                            	<button class="btn btn-info" id="return-btn" onclick="returnIndex()" ><i class="fa fa-mail-reply">&nbsp;&nbsp;</i>返回</button>
								<@permission btnType="save" btnId="saveBtn" btnValue="保存" op="test:projectScene:save" btnMethod="TestProjectSceneMgr.submitForm()"/>
                            </div>
                        </form>
                    </div>

                    <div  class="form-horizontal  h-form-warp">
	                     <div class="h-msg-title h-table-header">
	                        <strong>项目测试场景信息</strong>
	                    </div>
			              <form id="testProjectSceneForm" role="form" class="form-horizontal" action="/testProjectScene/saveTestProjectScene" method="post">
	                    	<input type="hidden" id="operation" name="operation" value="${operation}"/>
														<input type="hidden" class="form-control" value="${testProjectScene.id!}" id="id" name = "id">	
								                    																																<div class="form-group">
										<label class="col-sm-2 control-label">项目id ：</label>
										<div class="col-sm-8">
											<input type="text" class="form-control" value="${testProjectScene.projectId!}" id="projectId" name="projectId" 
											 required="required"      number="true"  maxlength='19' />
										</div>
																					<div class="col-sm-1">
												<span class="required">*</span>
											</div>
																			</div>
																																																												<div class="form-group">
										<label class="col-sm-2 control-label">场景id ：</label>
										<div class="col-sm-8">
											<input type="text" class="form-control" value="${testProjectScene.sceneId!}" id="sceneId" name="sceneId" 
											 required="required"      number="true"  maxlength='19' />
										</div>
																					<div class="col-sm-1">
												<span class="required">*</span>
											</div>
																			</div>
																																																												<div class="form-group">
										<label class="col-sm-2 control-label">版本号 ：</label>
										<div class="col-sm-8">
											<input type="text" class="form-control" value="${testProjectScene.testVersion!}" id="testVersion" name="testVersion" 
											 required="required"      number="true"  maxlength='20' />
										</div>
																					<div class="col-sm-1">
												<span class="required">*</span>
											</div>
																			</div>
																																																												<div class="form-group">
										<label class="col-sm-2 control-label">测试负责人 ：</label>
										<div class="col-sm-8">
											<input type="text" class="form-control" value="${testProjectScene.testLeader!}" id="testLeader" name="testLeader" 
											 required="required"      number="true"  maxlength='19' />
										</div>
																					<div class="col-sm-1">
												<span class="required">*</span>
											</div>
																			</div>
																																																												<div class="form-group">
										<label class="col-sm-2 control-label">测试人员 ：</label>
										<div class="col-sm-8">
											<input type="text" class="form-control" value="${testProjectScene.testPersons!}" id="testPersons" name="testPersons" 
											 required="required"      number="true"  maxlength='128' />
										</div>
																					<div class="col-sm-1">
												<span class="required">*</span>
											</div>
																			</div>
																														                    </form>
	                </div>
                </div>
            </div>
            <!-- end: PAGE -->
        </div>
        <!-- end: MAIN CONTAINER -->
    </div>

   <#include "/common/jslib.html">
    <!-- 弹窗下拉 -->
    <script type="text/javascript">
        function returnIndex(){
        	window.location.href="/testProjectScene/query";
        }
        $(function() {
        	// 页面操作类型：add(添加)-edit(编辑)-view(查看)
        	var operation = $("#operation").val();
        	// 弹出窗体控制
        	TestProjectSceneMgr = {
        		// 初始化
        		init : function() {
        			// 查看的时候不显示保存按钮
        			if (operation == "view") {
        				Jmts.setFormReadOnly();							
        			}
        			initAmtAndRate();
        		},
        		// init end
        		
        		// 提交数据
        		submitForm : function() {
					Jmts.convertAmtAndRate();//反格式化金额和利率，以防保存出错
        			Jmts.ajaxSubmit(document.getElementById("testProjectSceneForm"), function(result) {
        				if(result.success){
        					if(operation =='add'){
            					TestProjectSceneMgr.returnIndex();
            				}else{
            					Jmts.succTips(result.msg);
            					window.location.reload();
            				}
        				}else{
        					Jmts.revertAmtAndRate();
        					Jmts.warnTips(result.msg);
        				}
        			});
        			return false;
        		},
        		// submitForm end
        		returnIndex : function(){
        			window.location.href="/testProjectScene/query";
        		}
        	};
        	// 执行初始化
        	TestProjectSceneMgr.init();
        	// 前台验证表单
        	$("#testProjectSceneForm").validate();
        });
    </script>
</body>
</html>
